/*
 * vim:fdm=marker:
 */
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h>

static const int divisors[] = { 2, 3, 5, 7, 11, 13 };
#define D_LEN (sizeof divisors / sizeof divisors[0])

/* {{{ queue */
struct ll_node {
	long long data;
	struct ll_node *next;
};

struct ll_node *
ll_append(struct ll_node *tail, long long newdata, bool is_really_tail)
{
	struct ll_node *newnode;

	if (is_really_tail) assert(tail->next == NULL);
	newnode = malloc(sizeof *newnode);
	newnode->data = newdata;
	newnode->next = NULL;
	tail->next = newnode;

	return newnode;
}

void
ll_destroy(struct ll_node *head)
{
	register struct ll_node *ptr = head;

	while (head) {
		ptr = head;
		head = head->next;
		free(ptr);
	}
}
/* }}} */

int
main(int argc, char **argv)
{
	struct ll_node *lists[D_LEN];
	struct ll_node *tails[D_LEN];
	struct ll_node *tmp_node = NULL;
	int n;
	register int i = 0, count = 0;
	long long min;
	int min_idx;

	scanf("%d", &n);

	for (i = 0; i < D_LEN; i++) {
		tails[i] = lists[i] = malloc(sizeof (struct ll_node));
		lists[i]->data = divisors[i];
		lists[i]->next = NULL;
	}

	if (n >= 1)
		fputs("1 ", stdout);

	for (count = 1; count < n; count++) {
		min = lists[(min_idx = 0)]->data;

		for (i = 1; i < D_LEN; i++)
			if (min > lists[i]->data) {
				min = lists[i]->data;
				min_idx = i;
			}

		for (i = 0; i < D_LEN; i++) {
			tails[i] = ll_append(tails[i], min * divisors[i],
					true);
			if (lists[i]->data == min && i != min_idx) {
				tmp_node = lists[i];
				lists[i] = lists[i]->next;
				free(tmp_node);
			}
		}

		tmp_node = lists[min_idx];
		lists[min_idx] = lists[min_idx]->next;
		free(tmp_node);
		printf("%lld ", min);
	}
	fputc('\n', stdout);

	for (i = 0; i < D_LEN; i++)
		ll_destroy(lists[i]);

	return 0;
}
